package com.xbongbong.pro.businessrule.pojo.dto;

import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import com.xbongbong.paas.toolbox.wrap.UserVO;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.List;

/**
 * @author 吴峰
 * @version v1.0
 * @date 2020/6/19 10:49
 * @since v1.0
 */
@Setter
@Getter
@ToString
public class OperatorBatchDTO extends BaseDTO {
    private static final long serialVersionUID = 165886637123153140L;

    private List<OperationDTO> operationDtoList;

    private Integer saasMark;

    private Integer businessType;

    private Long formId;

    private Long dataId;

    private Long logId;

    /**
     * 出错信息
     */
    private String message;

    /**
     * 出错原因（1：自身错误；2：被动错误；3：数据量过大）
     *
     */
    private Integer reason;

    private String redisKey;
    private Integer businessRuleSize;

    private Long businessRuleInfoId;

    private Integer businessRuleType;

    private Integer isImport;

    public OperatorBatchDTO() {
    }

    public OperatorBatchDTO(List<OperationDTO> operationDtoList, Integer saasMark, Integer businessType, Long formId, Long dataId,
                            String corpid, UserVO userVO, String platform,
                            String httpHeader, String browserInfo, String ip, String locale, Integer isImport) {
        this.saasMark = saasMark;
        this.businessType = businessType;
        this.formId = formId;
        this.dataId = dataId;
        this.operationDtoList = operationDtoList;
        this.isImport = isImport;
        setCorpid(corpid);
        setLoginUser(userVO);
        setUserId(userVO.getUserId());
        setLoginUserName(userVO.getName());
        setPlatform(platform);
        setHttpHeader(httpHeader);
        setBrowserInfo(browserInfo);
        setIp(ip);
        setLocale(locale);
    }
}
